<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="dsPrichObr" targetNamespace="http://tempuri.org/dsPrichObr.xsd" xmlns:mstns="http://tempuri.org/dsPrichObr.xsd" xmlns="http://tempuri.org/dsPrichObr.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="p301ConnString" ConnectionStringObject="" IsAppSettingsProperty="True" Modifier="Assembly" Name="p301ConnString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.p301.Properties.Settings.GlobalReference.Default.p301ConnString" Provider="System.Data.SqlClient">
          </Connection>
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="taPrichObr" GeneratorDataComponentClassName="taPrichObr" Name="dtPrichObr" UserDataComponentName="taPrichObr">
            <MainSource>
              <DbSource ConnectionRef="p301ConnString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Fill" GenerateShortCommands="False" GeneratorSourceName="Fill" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT     s_prich.N_PRICH, bo_prich_obr_.C_KONS, ISNULL(bo_prich_obr_.K_PERIOD_LET, 0) AS K_PERIOD_LET, bo_prich_obr_.K_POL
FROM         bo_prich_obr_ INNER JOIN
                      s_prich ON bo_prich_obr_.K_PRICH = s_prich.K_PRICH
WHERE     (bo_prich_obr_.K_PRICH_OBR = @pK_PRICH_OBR)
ORDER BY s_prich.N_PRICH</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="pK_PRICH_OBR" ColumnName="K_PRICH_OBR" DataSourceName="p301.dbo.bo_prich_obr_" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@pK_PRICH_OBR" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="K_PRICH_OBR" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="N_PRICH" DataSetColumn="N_PRICH" />
              <Mapping SourceColumn="C_KONS" DataSetColumn="C_KONS" />
              <Mapping SourceColumn="K_PERIOD_LET" DataSetColumn="K_PERIOD_LET" />
              <Mapping SourceColumn="K_POL" DataSetColumn="K_POL" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="taPeriodLet" GeneratorDataComponentClassName="taPeriodLet" Name="dtPeriodLet" UserDataComponentName="taPeriodLet">
            <MainSource>
              <DbSource ConnectionRef="p301ConnString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     ISNULL(s_period_let_prich_obr.N_PERIOD, 'Не указан') AS N_PERIOD, ISNULL(s_period_let_prich_obr.K_PERIOD_LET, 0) AS K_PERIOD_LET
FROM         s_period_let_prich_obr RIGHT OUTER JOIN
                          (SELECT     K_PERIOD_LET
                            FROM          bo_prich_obr_
                            WHERE      (K_PRICH_OBR = @pK_PRICH_OBR)
                            GROUP BY K_PERIOD_LET) AS t ON s_period_let_prich_obr.K_PERIOD_LET = t.K_PERIOD_LET
ORDER BY s_period_let_prich_obr.C_START</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="pK_PRICH_OBR" ColumnName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@pK_PRICH_OBR" Precision="0" Scale="0" Size="4" SourceColumn="" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="N_PERIOD" DataSetColumn="N_PERIOD" />
              <Mapping SourceColumn="K_PERIOD_LET" DataSetColumn="K_PERIOD_LET" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="taPrichObrList" GeneratorDataComponentClassName="taPrichObrList" Name="dtPrichObrList" UserDataComponentName="taPrichObrList">
            <MainSource>
              <DbSource ConnectionRef="p301ConnString (Settings)" DbObjectName="p301.dbo.vRepPrichObrList" DbObjectType="View" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>select * from vRepPrichObrList
where K_PRICH_OBR = @pK_PRICH_OBR</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="pK_PRICH_OBR" ColumnName="K_PRICH_OBR" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@pK_PRICH_OBR" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="K_PRICH_OBR" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="K_PRICH_OBR" DataSetColumn="K_PRICH_OBR" />
              <Mapping SourceColumn="N_PERIOD" DataSetColumn="N_PERIOD" />
              <Mapping SourceColumn="D_ZAP" DataSetColumn="D_ZAP" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources>
        </Sources>
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="dsPrichObr" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="dsPrichObr" msprop:Generator_DataSetName="dsPrichObr">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="dtPrichObr" msprop:Generator_UserTableName="dtPrichObr" msprop:Generator_RowDeletedName="dtPrichObrRowDeleted" msprop:Generator_RowChangedName="dtPrichObrRowChanged" msprop:Generator_RowClassName="dtPrichObrRow" msprop:Generator_RowChangingName="dtPrichObrRowChanging" msprop:Generator_RowEvArgName="dtPrichObrRowChangeEvent" msprop:Generator_RowEvHandlerName="dtPrichObrRowChangeEventHandler" msprop:Generator_TableClassName="dtPrichObrDataTable" msprop:Generator_TableVarName="tabledtPrichObr" msprop:Generator_RowDeletingName="dtPrichObrRowDeleting" msprop:Generator_TablePropName="dtPrichObr">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="N_PRICH" msprop:Generator_UserColumnName="N_PRICH" msprop:Generator_ColumnVarNameInTable="columnN_PRICH" msprop:Generator_ColumnPropNameInRow="N_PRICH" msprop:Generator_ColumnPropNameInTable="N_PRICHColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="C_KONS" msprop:Generator_UserColumnName="C_KONS" msprop:Generator_ColumnVarNameInTable="columnC_KONS" msprop:Generator_ColumnPropNameInRow="C_KONS" msprop:Generator_ColumnPropNameInTable="C_KONSColumn" type="xs:int" minOccurs="0" />
              <xs:element name="K_PERIOD_LET" msprop:Generator_UserColumnName="K_PERIOD_LET" msprop:Generator_ColumnVarNameInTable="columnK_PERIOD_LET" msprop:Generator_ColumnPropNameInRow="K_PERIOD_LET" msprop:Generator_ColumnPropNameInTable="K_PERIOD_LETColumn" type="xs:int" minOccurs="0" />
              <xs:element name="K_POL" msprop:Generator_UserColumnName="K_POL" msprop:Generator_ColumnVarNameInTable="columnK_POL" msprop:Generator_ColumnPropNameInRow="K_POL" msprop:Generator_ColumnPropNameInTable="K_POLColumn" type="xs:unsignedByte" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="dtPeriodLet" msprop:Generator_UserTableName="dtPeriodLet" msprop:Generator_RowDeletedName="dtPeriodLetRowDeleted" msprop:Generator_RowChangedName="dtPeriodLetRowChanged" msprop:Generator_RowClassName="dtPeriodLetRow" msprop:Generator_RowChangingName="dtPeriodLetRowChanging" msprop:Generator_RowEvArgName="dtPeriodLetRowChangeEvent" msprop:Generator_RowEvHandlerName="dtPeriodLetRowChangeEventHandler" msprop:Generator_TableClassName="dtPeriodLetDataTable" msprop:Generator_TableVarName="tabledtPeriodLet" msprop:Generator_RowDeletingName="dtPeriodLetRowDeleting" msprop:Generator_TablePropName="dtPeriodLet">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="N_PERIOD" msdata:ReadOnly="true" msprop:Generator_UserColumnName="N_PERIOD" msprop:Generator_ColumnVarNameInTable="columnN_PERIOD" msprop:Generator_ColumnPropNameInRow="N_PERIOD" msprop:Generator_ColumnPropNameInTable="N_PERIODColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="K_PERIOD_LET" msdata:ReadOnly="true" msprop:Generator_UserColumnName="K_PERIOD_LET" msprop:Generator_ColumnVarNameInTable="columnK_PERIOD_LET" msprop:Generator_ColumnPropNameInRow="K_PERIOD_LET" msprop:Generator_ColumnPropNameInTable="K_PERIOD_LETColumn" type="xs:int" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="dtPrichObrList" msprop:Generator_UserTableName="dtPrichObrList" msprop:Generator_RowDeletedName="dtPrichObrListRowDeleted" msprop:Generator_RowChangedName="dtPrichObrListRowChanged" msprop:Generator_RowClassName="dtPrichObrListRow" msprop:Generator_RowChangingName="dtPrichObrListRowChanging" msprop:Generator_RowEvArgName="dtPrichObrListRowChangeEvent" msprop:Generator_RowEvHandlerName="dtPrichObrListRowChangeEventHandler" msprop:Generator_TableClassName="dtPrichObrListDataTable" msprop:Generator_TableVarName="tabledtPrichObrList" msprop:Generator_RowDeletingName="dtPrichObrListRowDeleting" msprop:Generator_TablePropName="dtPrichObrList">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="K_PRICH_OBR" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="K_PRICH_OBR" msprop:Generator_ColumnVarNameInTable="columnK_PRICH_OBR" msprop:Generator_ColumnPropNameInRow="K_PRICH_OBR" msprop:Generator_ColumnPropNameInTable="K_PRICH_OBRColumn" type="xs:int" />
              <xs:element name="N_PERIOD" msdata:ReadOnly="true" msprop:Generator_UserColumnName="N_PERIOD" msprop:Generator_ColumnVarNameInTable="columnN_PERIOD" msprop:Generator_ColumnPropNameInRow="N_PERIOD" msprop:Generator_ColumnPropNameInTable="N_PERIODColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="D_ZAP" msprop:Generator_UserColumnName="D_ZAP" msprop:Generator_ColumnVarNameInTable="columnD_ZAP" msprop:Generator_ColumnPropNameInRow="D_ZAP" msprop:Generator_ColumnPropNameInTable="D_ZAPColumn" type="xs:dateTime" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:dtPrichObrList" />
      <xs:field xpath="mstns:K_PRICH_OBR" />
    </xs:unique>
  </xs:element>
</xs:schema>